#include <iostream>
using namespace std;

//定义全局变量统计学生数量
int n=0;
//定义全局变量统计总的分数
float result=0.0;
class Student
{
public:
	Student(string _name,int _num,float _score)
	{
		name=_name;
		num=_num;
		score=_score;
		//统计学生数量
		n++;
		//统计学生分数
		result+=score;
	}
	void disp()
	{
		cout<<"姓名: "<<name<<"  学号: "<<num<<"  分数:  "<<score<<endl;
	}
private:
	int num;
	string name;
	float score;
};

int main()
{
	Student s1("张三",1,85.5);
	Student s2("李四",2,56.5);
	Student s3("王五",3,78.5);
	cout<<"平均分: "<<result/n<<endl;
}